unit NovinAfzar64_TLB;

// ************************************************************************ //
// WARNING                                                                    
// -------                                                                    
// The types declared in this file were generated from data read from a       
// Type Library. If this type library is explicitly or indirectly (via        
// another type library referring to this type library) re-imported, or the   
// 'Refresh' command of the Type Library Editor activated while editing the   
// Type Library, the contents of this file will be regenerated and all        
// manual modifications will be lost.                                         
// ************************************************************************ //

// $Rev: 52393 $
// File generated on 29/03/2015 01:09:13 ب.ظ from Type Library described below.

// ************************************************************************  //
// Type Lib: C:\Program Files\Novin Afzar Corp\NovinHIDLock ActiveX\XNovinHIDLock64.dll (1)
// LIBID: {10C42C51-F2B5-4186-93E2-96A657086BA1}
// LCID: 0
// Helpfile: 
// HelpString: 
// DepndLst: 
//   (1) v2.0 stdole, (C:\Windows\SysWOW64\stdole2.tlb)
// SYS_KIND: SYS_WIN32
// ************************************************************************ //
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
{$ALIGN 4}

interface

uses Winapi.Windows, System.Classes, System.Variants, System.Win.StdVCL, Vcl.Graphics, Vcl.OleServer, Winapi.ActiveX;
  

// *********************************************************************//
// GUIDS declared in the TypeLibrary. Following prefixes are used:        
//   Type Libraries     : LIBID_xxxx                                      
//   CoClasses          : CLASS_xxxx                                      
//   DISPInterfaces     : DIID_xxxx                                       
//   Non-DISP interfaces: IID_xxxx                                        
// *********************************************************************//
const
  // TypeLibrary Major and minor versions
  NovinAfzar64MajorVersion = 10;
  NovinAfzar64MinorVersion = 0;

  LIBID_NovinAfzar64: TGUID = '{10C42C51-F2B5-4186-93E2-96A657086BA1}';

  IID__clsHIDLock: TGUID = '{CBBDB35F-FD4A-49AB-B0EC-B6FA0FF5253D}';
  CLASS_clsHIDLock: TGUID = '{403D6D15-9136-4211-A45F-78B97049C60A}';
type

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary                    
// *********************************************************************//
  _clsHIDLock = interface;
  _clsHIDLockDisp = dispinterface;

// *********************************************************************//
// Declaration of CoClasses defined in Type Library                       
// (NOTE: Here we map each CoClass to its Default Interface)              
// *********************************************************************//
  clsHIDLock = _clsHIDLock;


// *********************************************************************//
// Interface: _clsHIDLock
// Flags:     (4560) Hidden Dual NonExtensible OleAutomation Dispatchable
// GUID:      {9CA3F73A-792D-4831-8C43-ADF60099B1B2}
// *********************************************************************//
  _clsHIDLock = interface(IDispatch)
    ['{CBBDB35F-FD4A-49AB-B0EC-B6FA0FF5253D}']
    procedure Init; safecall;
    procedure GetFirstDevice; safecall;
    procedure GetNextDevice; safecall;
    function GetDeviceCount: Integer; safecall;
    procedure SelectDevice(const SerialNo: WideString); safecall;
    procedure GetDeviceReady; safecall;
    procedure GetDeviceStatus; safecall;
    function GetSerial: WideString; safecall;
    function GetBriefSerial: WideString; safecall;
    function GetVersion: WideString; safecall;
    function GetMemorySize: Integer; safecall;
    function GetMemorySizeEx: WideString; safecall;
    function GetDataBlockStr(const sVID: WideString; const sPWD: WideString; Start: Integer; 
                             DataLen: Integer): WideString; safecall;
    procedure SetDataBlockStr(const sVID: WideString; const sPWD: WideString; Start: Integer; 
                              DataLen: Integer; const DataBlockStr: WideString; 
                              const defChar: WideString); safecall;
    function GetDataChar(const sVID: WideString; const sPWD: WideString; Index: Integer): WideString; safecall;
    procedure SetDataChar(const sVID: WideString; const sPWD: WideString; Index: Integer; 
                          const DataChar: WideString); safecall;
    function GetDataByte(const sVID: WideString; const sPWD: WideString; Address: Integer): Byte; safecall;
    procedure SetDataByte(const sVID: WideString; const sPWD: WideString; Address: Integer; 
                          DataByte: Byte); safecall;
    function GetDataHEXBlock(const sVID: WideString; const sPWD: WideString; Start: Integer; 
                             DataLen: Integer): WideString; safecall;
    procedure SetDataHEXBlock(const sVID: WideString; const sPWD: WideString; Start: Integer; 
                              DataLen: Integer; const DataHEXBlock: WideString); safecall;
    function GetDecryption(const sVID: WideString; const sPWD: WideString; 
                           const sCData: WideString; Repetition: Integer): WideString; safecall;
    function GetEncryption(const sVID: WideString; const sPWD: WideString; 
                           const sPData: WideString; Repetition: Integer): WideString; safecall;
    function GetPID(const sVID: WideString; const sPWD: WideString): WideString; safecall;
    function GetNET: Integer; safecall;
    function GetTimerCounter: Integer; safecall;
    procedure Activate(const Code: WideString); safecall;
    procedure DecreaseCounter; safecall;
    procedure SetSecret(const CurrKey: WideString; const NewKey: WideString); safecall;
    procedure ClearSecret(const CurrKey: WideString); safecall;
    function ConvStringToDelimiteredString(const strCnv: WideString; ALen: Integer; 
                                           const DSep: WideString): WideString; safecall;
    function ConvDelimiteredStringToString(const strDCnv: WideString; ALen: Integer; 
                                           const DSep: WideString): WideString; safecall;
    function ConvStringToHEXString(const strCnv: WideString; ALen: Integer; const HSep: WideString): WideString; safecall;
    function ConvHEXStringToString(const strHCnv: WideString; ALen: Integer): WideString; safecall;
    function ConvDelimiteredStringToHEXString(const strDCnv: WideString; ALen: Integer; 
                                              const DSep: WideString; const HSep: WideString): WideString; safecall;
    function ConvHEXStringToDelimiteredString(const strHCnv: WideString; ALen: Integer; 
                                              const DSep: WideString): WideString; safecall;
    procedure Finalize; safecall;
    function Get_ErrNo: Integer; safecall;
    function Get_ErrDescr: WideString; safecall;
    function Get_ErrDescrFA: WideString; safecall;
    function Get_DeviceName: WideString; safecall;
    function Get_DeviceVer: WideString; safecall;
    function Get_DeviceSerial: WideString; safecall;
    function Get_SelectedName: WideString; safecall;
    function Get_SelectedVer: WideString; safecall;
    function Get_SelectedSerial: WideString; safecall;
    property ErrNo: Integer read Get_ErrNo;
    property ErrDescr: WideString read Get_ErrDescr;
    property ErrDescrFA: WideString read Get_ErrDescrFA;
    property DeviceName: WideString read Get_DeviceName;
    property DeviceVer: WideString read Get_DeviceVer;
    property DeviceSerial: WideString read Get_DeviceSerial;
    property SelectedName: WideString read Get_SelectedName;
    property SelectedVer: WideString read Get_SelectedVer;
    property SelectedSerial: WideString read Get_SelectedSerial;
  end;

// *********************************************************************//
// DispIntf:  _clsHIDLockDisp
// Flags:     (4560) Hidden Dual NonExtensible OleAutomation Dispatchable
// GUID:      {9CA3F73A-792D-4831-8C43-ADF60099B1B2}
// *********************************************************************//
  _clsHIDLockDisp = dispinterface
    ['{CBBDB35F-FD4A-49AB-B0EC-B6FA0FF5253D}']
    procedure Init; dispid 301;
    procedure GetFirstDevice; dispid 302;
    procedure GetNextDevice; dispid 303;
    function GetDeviceCount: Integer; dispid 304;
    procedure SelectDevice(const SerialNo: WideString); dispid 305;
    procedure GetDeviceReady; dispid 306;
    procedure GetDeviceStatus; dispid 307;
    function GetSerial: WideString; dispid 308;
    function GetBriefSerial: WideString; dispid 309;
    function GetVersion: WideString; dispid 310;
    function GetMemorySize: Integer; dispid 311;
    function GetMemorySizeEx: WideString; dispid 312;
    function GetDataBlockStr(const sVID: WideString; const sPWD: WideString; Start: Integer; 
                             DataLen: Integer): WideString; dispid 313;
    procedure SetDataBlockStr(const sVID: WideString; const sPWD: WideString; Start: Integer; 
                              DataLen: Integer; const DataBlockStr: WideString; 
                              const defChar: WideString); dispid 314;
    function GetDataChar(const sVID: WideString; const sPWD: WideString; Index: Integer): WideString; dispid 315;
    procedure SetDataChar(const sVID: WideString; const sPWD: WideString; Index: Integer; 
                          const DataChar: WideString); dispid 316;
    function GetDataByte(const sVID: WideString; const sPWD: WideString; Address: Integer): Byte; dispid 317;
    procedure SetDataByte(const sVID: WideString; const sPWD: WideString; Address: Integer; 
                          DataByte: Byte); dispid 318;
    function GetDataHEXBlock(const sVID: WideString; const sPWD: WideString; Start: Integer; 
                             DataLen: Integer): WideString; dispid 319;
    procedure SetDataHEXBlock(const sVID: WideString; const sPWD: WideString; Start: Integer; 
                              DataLen: Integer; const DataHEXBlock: WideString); dispid 320;
    function GetDecryption(const sVID: WideString; const sPWD: WideString; 
                           const sCData: WideString; Repetition: Integer): WideString; dispid 321;
    function GetEncryption(const sVID: WideString; const sPWD: WideString; 
                           const sPData: WideString; Repetition: Integer): WideString; dispid 322;
    function GetPID(const sVID: WideString; const sPWD: WideString): WideString; dispid 323;
    function GetNET: Integer; dispid 324;
    function GetTimerCounter: Integer; dispid 325;
    procedure Activate(const Code: WideString); dispid 326;
    procedure DecreaseCounter; dispid 327;
    procedure SetSecret(const CurrKey: WideString; const NewKey: WideString); dispid 328;
    procedure ClearSecret(const CurrKey: WideString); dispid 329;
    function ConvStringToDelimiteredString(const strCnv: WideString; ALen: Integer; 
                                           const DSep: WideString): WideString; dispid 330;
    function ConvDelimiteredStringToString(const strDCnv: WideString; ALen: Integer; 
                                           const DSep: WideString): WideString; dispid 331;
    function ConvStringToHEXString(const strCnv: WideString; ALen: Integer; const HSep: WideString): WideString; dispid 332;
    function ConvHEXStringToString(const strHCnv: WideString; ALen: Integer): WideString; dispid 333;
    function ConvDelimiteredStringToHEXString(const strDCnv: WideString; ALen: Integer; 
                                              const DSep: WideString; const HSep: WideString): WideString; dispid 334;
    function ConvHEXStringToDelimiteredString(const strHCnv: WideString; ALen: Integer; 
                                              const DSep: WideString): WideString; dispid 335;
    procedure Finalize; dispid 336;
    property ErrNo: Integer readonly dispid 201;
    property ErrDescr: WideString readonly dispid 202;
    property ErrDescrFA: WideString readonly dispid 203;
    property DeviceName: WideString readonly dispid 204;
    property DeviceVer: WideString readonly dispid 205;
    property DeviceSerial: WideString readonly dispid 206;
    property SelectedName: WideString readonly dispid 207;
    property SelectedVer: WideString readonly dispid 208;
    property SelectedSerial: WideString readonly dispid 209;
  end;

// *********************************************************************//
// The Class CoclsHIDLock provides a Create and CreateRemote method to          
// create instances of the default interface _clsHIDLock exposed by              
// the CoClass clsHIDLock. The functions are intended to be used by             
// clients wishing to automate the CoClass objects exposed by the         
// server of this typelibrary.                                            
// *********************************************************************//
  CoclsHIDLock = class
    class function Create: _clsHIDLock;
    class function CreateRemote(const MachineName: string): _clsHIDLock;
  end;

implementation

uses System.Win.ComObj;

class function CoclsHIDLock.Create: _clsHIDLock;
begin
  Result := CreateComObject(CLASS_clsHIDLock) as _clsHIDLock;
end;

class function CoclsHIDLock.CreateRemote(const MachineName: string): _clsHIDLock;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_clsHIDLock) as _clsHIDLock;
end;

end.
